/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

import { TypeScriptVersionProvider, TypeScriptVersion } from './versionProvider';

const useWorkspaceTsdkStorageKey = 'typescript.useWorkspaceTsdk';

enum MessageAction {
	useLocal,
	useBundled,
	learnMore
}

export class TypeScriptVersionPicker {
	private _currentVersion: TypeScriptVersion;

	public constructor(
		private readonly versionProvider: TypeScriptVersionProvider,
	) {
		this._currentVersion = this.versionProvider.defaultVersion;

		//if (this.useWorkspaceTsdkSetting) {
		//	const localVersion = this.versionProvider.localVersion;
		//	if (localVersion) {
		//		this._currentVersion = localVersion;
		//	}
		//}
	}

	//public get useWorkspaceTsdkSetting(): boolean {
	//	return this.workspaceState.get<boolean>(useWorkspaceTsdkStorageKey, false);
	//}

	public get currentVersion(): TypeScriptVersion {
		return this._currentVersion;
	}

	//public useBundledVersion(): void {
	//	this._currentVersion = this.versionProvider.bundledVersion;
	//}
}